A keyboard apparatus has a long shape corresponding to the number of keys in a direction in which the keys are arranged. To solve a problem occurring due to such a shape, various structures are applied within a housing. For example, a technique for defining a positional relationship among the components arranged within the housing with high accuracy is disclosed in Japanese Patent No. 5532670.